Skip to content

feat(parquet): add Bloom row-group pruning - #1114

Open
zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:feat/parquet-bloom-row-group-filter
Open

zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:feat/parquet-bloom-row-group-filter

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Evaluate EQ and IN predicates with Arrow's Bloom reader after footer statistics, following Java Iceberg's inclusive filtering rules. Keep other predicates, missing columns and files without usable field IDs or Bloom metadata inclusive.

Hash literals using the file's physical representation, including numeric promotions, temporal types, decimal precision and width, binary/fixed and UUID values. Cache each column's Bloom filter per row group and load only Bloom payloads during planning. Preserve split selection, file-relative row positions and inherited row IDs after pruning.

Evaluate EQ and IN predicates with Arrow's Bloom reader after footer
statistics, following Java Iceberg's inclusive filtering rules. Keep
other predicates, missing columns and files without usable field IDs or
Bloom metadata inclusive.

Hash literals using the file's physical representation, including numeric
promotions, temporal types, decimal precision and width, binary/fixed and
UUID values. Cache each column's Bloom filter per row group and load only
Bloom payloads during planning. Preserve split selection, file-relative
row positions and inherited row IDs after pruning.
BloomVisitor visitor(manifest, row_group, bloom_reader, field_id_to_column_idx_);
return Visit<bool>(bound_, visitor);
} catch (const ::parquet::ParquetException& e) {
return Invalid("Cannot read Parquet Bloom filter: {}", e.what());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we fail on this path? Might it still match?

auto should_read, stats_filter_->ShouldRead(reader_->manifest(), *row_group));
if (should_read && bloom_filter_) {
auto bloom_reader =
reader_->parquet_reader()->GetBloomFilterReader().RowGroup(row_group_index);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can throw uncaught.

@manuzhang

manuzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

@zhjwpku Thanks for the PR. I've left some comments inline. BTW, is there a flag to switch on/off this feature?

@zhjwpku

zhjwpku commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

@zhjwpku Thanks for the PR. I've left some comments inline. BTW, is there a flag to switch on/off this feature?

Yeah, maybe we should have some handles for these pruning, let me check how the java impl deal with this.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants